public static DSA FromCapiKeyBlobDSA(byte[] blob, int offset) { if (blob == null) { throw new ArgumentNullException("blob"); } if (offset >= blob.Length) { throw new ArgumentException("blob is too small."); } byte b = blob[offset]; if (b == 6) { return(CryptoConvert.FromCapiPublicKeyBlobDSA(blob, offset)); } if (b != 7) { throw new CryptographicException("Unknown blob format."); } return(CryptoConvert.FromCapiPrivateKeyBlobDSA(blob, offset)); }
public static DSA FromCapiKeyBlobDSA(byte[] blob, int offset) { if (blob == null) { throw new ArgumentNullException(nameof(blob)); } if (offset >= blob.Length) { throw new ArgumentException("blob is too small."); } switch (blob[offset]) { case 6: return(CryptoConvert.FromCapiPublicKeyBlobDSA(blob, offset)); case 7: return(CryptoConvert.FromCapiPrivateKeyBlobDSA(blob, offset)); default: throw new CryptographicException("Unknown blob format."); } }
public static DSA FromCapiPrivateKeyBlobDSA(byte[] blob) { return(CryptoConvert.FromCapiPrivateKeyBlobDSA(blob, 0)); }