コード例 #1
0
        public EncryptionKey GenerateKey(EncryptionKey baseKey)
        {
            if (baseKey == null || baseKey.keytype == null ||
                baseKey.keyvalue == null || baseKey.keyvalue.Value == null)
            {
                return(null);
            }

            byte[] keyBuffer = KerberosUtility.GenerateRandomBytes((uint)baseKey.keyvalue.ByteArrayValue.Length);
            var    newKey    = new EncryptionKey(new KerbInt32(baseKey.keytype.Value), new Asn1OctetString(keyBuffer));

            return(newKey);
        }