Encryption secrets

Are there any restrictions regarding the encryption secrets (i.e. regarding length, symbols, etc.)?