public static string FromPublicKey(string publicKey) { var publicKeyBlob = Convert.FromBase64String(publicKey).Skip(8).Take(64).ToArray(); PemPart pem = PemPart.BuildPublicKeyPack(publicKeyBlob); return(pem.BuildPublicKeyPem()); }
public static string FromKeyPair(string privateKey, string publicKey) { var privateKeyBlob = Convert.FromBase64String(privateKey).Skip(8 + 64).Take(32).ToArray(); var publicKeyBlob = Convert.FromBase64String(publicKey).Skip(8).Take(64).ToArray(); PemPart pem = PemPart.BuildPemPart(privateKeyBlob, publicKeyBlob); return(pem.BuildPem()); }
public static string FromPublicKey(byte[] publicKey) { PemPart pem = PemPart.BuildPublicKeyPack(publicKey); return(pem.BuildPublicKeyPem()); }
public static string FromKeyPair(byte[] privateKey, byte[] publicKey) { PemPart pem = PemPart.BuildPemPart(privateKey, publicKey); return(pem.BuildPem()); }