コード例 #1
0
ファイル: Generate.cs プロジェクト: smalltsky/Kryptor
 public static byte[] KeyEncryptionKey(byte[] sharedSecret, byte[] ephemeralSharedSecret, byte[] salt)
 {
     byte[] inputKeyingMaterial = Utilities.ConcatArrays(sharedSecret, ephemeralSharedSecret);
     byte[] keyEncryptionKey    = Blake2.KeyDerivation(inputKeyingMaterial, salt, Constants.EncryptionKeyLength);
     Utilities.ZeroArray(ephemeralSharedSecret);
     Utilities.ZeroArray(inputKeyingMaterial);
     return(keyEncryptionKey);
 }
コード例 #2
0
ファイル: Generate.cs プロジェクト: tej0402/Kryptor
 public static byte[] KeyEncryptionKey(byte[] sharedSecret, byte[] ephemeralSharedSecret, byte[] salt)
 {
     byte[] inputKeyingMaterial = Arrays.Concat(sharedSecret, ephemeralSharedSecret);
     byte[] keyEncryptionKey    = Blake2.KeyDerivation(inputKeyingMaterial, salt, Constants.EncryptionKeyLength);
     CryptographicOperations.ZeroMemory(ephemeralSharedSecret);
     CryptographicOperations.ZeroMemory(inputKeyingMaterial);
     return(keyEncryptionKey);
 }
コード例 #3
0
ファイル: Generate.cs プロジェクト: smalltsky/Kryptor
 public static byte[] KeyEncryptionKey(byte[] ephemeralSharedSecret, byte[] salt)
 {
     byte[] keyEncryptionKey = Blake2.KeyDerivation(ephemeralSharedSecret, salt, Constants.EncryptionKeyLength);
     Utilities.ZeroArray(ephemeralSharedSecret);
     return(keyEncryptionKey);
 }
コード例 #4
0
ファイル: Generate.cs プロジェクト: tej0402/Kryptor
 public static byte[] KeyEncryptionKey(byte[] ephemeralSharedSecret, byte[] salt)
 {
     byte[] keyEncryptionKey = Blake2.KeyDerivation(ephemeralSharedSecret, salt, Constants.EncryptionKeyLength);
     CryptographicOperations.ZeroMemory(ephemeralSharedSecret);
     return(keyEncryptionKey);
 }