Janet Yellen added that she planned to encourage the use of digital assets for “legitimate activities.”