| 87 | //! Initialize a public key using begin/end iterators to byte data. |
| 88 | template <typename T> |
| 89 | void Set(const T pbegin, const T pend) |
| 90 | { |
| 91 | int len = pend == pbegin ? 0 : GetLen(pbegin[0]); |
| 92 | if (len && len == (pend - pbegin)) |
| 93 | memcpy(vch, (unsigned char*)&pbegin[0], len); |
| 94 | else |
| 95 | Invalidate(); |
| 96 | } |
| 97 | |
| 98 | //! Construct a public key using begin/end iterators to byte data. |
| 99 | template <typename T> |