예제 #1
0
 public void Create(LmsAlgorithmType[] lmsType, LmotsAlgorithmType lmotsType)
 {
     _hssTree = new HssNode[lmsType.Length];
     for (int i = 0; i < lmsType.Length; i++)
     {
         _hssTree[i] = new HssNode(lmsType[i], lmotsType);
     }
 }
예제 #2
0
        public HashSig(string privateKey)
        {
            string[] input  = privateKey.Split('|');
            int      levels = Int32.Parse(input[0]);

            if (input.Length != levels * 5 + 1)
            {
                throw new CoseException("Not a valid private key");
            }

            _hssTree = new HssNode[levels];
            for (int i = 0; i < levels; i++)
            {
                _hssTree[i] = new HssNode(input, i * 5 + 1);
            }
        }