SMS
These are a suite of APIs that allow you to vend SMS. Please note you are expected to fund your specified GTBank virtual account from which your VAS dashboard is credited.
API KEYS AND AUTHORIZATION
using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
public string Encrypt(string text, string keyString, string ivString)
{
using (RijndaelManaged myRijndael = new RijndaelManaged())
{
byte[] key = Encoding.ASCII.GetBytes(keyString);
byte[] iv = Encoding.ASCII.GetBytes(ivString);
byte[] encrypted;
using (RijndaelManaged rijAlg = new RijndaelManaged())
{
ICryptoTransform encryptor = rijAlg.CreateEncryptor(key, iv);
using (MemoryStream msEncrypt = new MemoryStream())
{
using (CryptoStream csEncrypt = new CryptoStream(msEncrypt, encryptor, CryptoStreamMode.Write))
{
using (StreamWriter swEncrypt = new StreamWriter(csEncrypt))
{
swEncrypt.Write(text);
}
encrypted = msEncrypt.ToArray();
}
}
}
string base64String = Convert.ToBase64String(encrypted);
return base64String;
}
}
Last updated